<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>TEA</title>
		<meta name="Keywords" content="TEA" />
		<%@ include file="/App/common/intoHead.jsp"%>
		<style>
			.vertical-center{
				position: absolute;
				top: 40%;
				left: 50%;
				transform: translate(-50%, -40%);
			}
			.text_style {
				height:30px;line-height:30px
			}
			.textbai{
				color:#ffffff;
			}
			.frbg{
				background-color:#8BC34A;
			}
			.transparent_class {   
			      filter:alpha(opacity=80);   
			      -moz-opacity:0.8;   
			      -khtml-opacity: 0.8;   
			      opacity: 0.8;   
			}   
		</style>
	</head>
	<body style="background-image: url('<%=request.getContextPath()%>/App/login/bg.jpg');">
		<br/><br/><br/>
		<h1 class="text-center textbai">TEA管理系统</h1>
		<div class="row vertical-center" >
			<div class="col-md-12" style="margin:20px;">
				<form id="formid" name="myform" method="post" action ="<%=request.getContextPath()%>/t/login/login.do" onsubmit="return checkUser();" >
					<input id="msg" type="hidden" value="${msg}"/>
					<fieldset>
						<div class="row" style="margin:20px;">
							<div class="col-md-3 text-right text_style"><h5 class="textbai">用户名：</h5></div>
							<div class="col-md-9">
								<input type="text" id="username" name="accName" class="form-control text_style"/>
							</div>
						</div>
						<div class="row" style="margin:20px;">
							<div class="col-md-3 text-right text_style"><h5 class="textbai">密&nbsp;&nbsp;&nbsp;码：</h5></div>
							<div class="col-md-9">
								<input type="password" id="password" name="password" class="form-control text_style"/>
							</div>
						</div>
						<br/>
						<div class="text-center form-group">
							<button id="submit" type="submit" class="btn btn-success" style="height:32px;padding-left:20px;padding-right:20px;">登录</button>
						</div>
					</fieldset>
				</form>
			</div>
		</div>
	</body>
	<script>
		$(document).ready(function() {
			if($("#msg").val()) {
				$(document).alertmsg("info", $("#msg").val(),{title:"提示信息"});
			}
		});
		function checkUser() {
			var username = $("#username").val();
			var password = $("#password").val();
			if(''==username||''==password) {
				$(document).alertmsg("info", "用户名密码为空",{title:"提示信息"});
				return false;
			}else {
				return true;
			}
		}
	</script>
</html>